Preserve note for future possibilities of strip_html.
authorrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 15 Sep 2013 21:51:42 +0000 (21:51 +0000)
committerrobertlipe <robertlipe@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Sun, 15 Sep 2013 21:51:42 +0000 (21:51 +0000)
gpsbabel/osm.cc
gpsbabel/util.cc

index d6d23068d9434c38fad6068cb07429d8b199ef7f..92c374015ae2530320670453cee70e42e991a3fd 100644 (file)
@@ -461,7 +461,7 @@ osm_strip_html(const char* str)
   utf.is_html = 1;
   utf.utfstring = (char*)str;
 
-  return strip_html(&utf);     // util.c
+  return strip_html(&utf);     // util.cc
 }
 
 
index d78f59869352da464485510d88b67e8f9d3345da..0059ee54cb45bd2e4a0a2be348c5a01a01d16159 100644 (file)
@@ -1490,6 +1490,14 @@ strip_nastyhtml(const QString& in)
 char*
 strip_html(const utf_string* in)
 {
+#if 0
+  // If we were willing to link core against QtGui (not out of the question)
+  // we could just do...and either decide whether to add handling for [IMG] 
+  // or just say we don't do that any more.
+  QTextDocument doc;
+  doc.setHtml( in->utfstring );
+  return xstrdup(CSTR(doc.toPlainText().simplified()));
+#else
   char* outstring, *out;
   char* incopy, *instr;
   char tag[8];
@@ -1569,6 +1577,7 @@ strip_html(const utf_string* in)
     xfree(incopy);
   }
   return (outstring);
+#endif
 }
 
 typedef struct {